package org.thief.frost.system.dao;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Repository;
import org.thief.frost.database.DatabaseManager;
import org.thief.frost.system.value.MenuDTO;

@Repository
public class LoginDaoImpl implements LoginDao {

	@Autowired
	private DatabaseManager databaseManager;

	public List<MenuDTO> queryList(String namedSql) {
		List<MenuDTO> mdList = databaseManager.getList(namedSql, MenuDTO.class);
		return mdList;
	}

	/**
	 * @param id
	 * @return
	 */
	public MenuDTO queryById(String namedSql, Integer id) {
		MenuDTO md = (MenuDTO) databaseManager.getJavaBean(namedSql, MenuDTO.class, id);
		return md;
	}
}
